<?php
$data = require '../../data.php';
include_once '../../include.php';
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
    <meta name="viewport" content="width=device-width,  minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
    <title>测测您的偏财运如何？</title>
    <script src="http://libs.baidu.com/jquery/1.8.2/jquery.min.js"></script>
    <script src="/exam/source/exam/default/js/avalon.mobile.min.js"></script>

    <script>
         document.write("<script type='text/javascript' src='/js/js_url.js?ver="+Math.random()+"'><\/script>");
    </script>
    <script src="/exam/source/exam/default/js/common.js?v=8.9"></script>
    <script>
        // 自动调用返回广告的函数
        var back_url = '<?php echo $data['back_url2'] ? $data['back_url2'] : ''  ?>';
        <?php if($data['back_url2']):?>
        setBack(back_url);
        <?php endif?>
    </script>

    <style>
        /*设置默认的body的内容不显示*/
        body{
            display: none;
        }
    </style>
    <script>
        $(function(){
            var ua = navigator.userAgent.toLowerCase();
            var isWeixin = ua.indexOf('micromessenger') != -1;
            var isAndroid = ua.indexOf('android') != -1;
            var isIos = (ua.indexOf('iphone') != -1) || (ua.indexOf('ipad') != -1);
            if (!isWeixin) {
                window.location.href =  "/must_wechat";
                document.head.innerHTML = '<title>抱歉，出错了</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=0"><link rel="stylesheet" type="text/css" href="https://res.wx.qq.com/open/libs/weui/0.4.1/weui.css">';
                document.body.innerHTML = '<div class="weui_msg"><div class="weui_icon_area"><i class="weui_icon_info weui_icon_msg"></i></div><div class="weui_text_area"><h4 class="weui_msg_title">请在微信客户端打开链接</h4></div></div>';
            }else{
                // 如果是微信浏览器，但是不是手机浏览器，就跳转qq官网
                var ok = /Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent);
                if(!ok){
                    window.location.href =  "http://www.qq.com/";
                    return false;
                }
            }
            // 显示body
            document.body.style.display='block'
        });
    </script>
    <script>
        console.log('this common file');
    </script>


    <style>
        * {
            font-family: "微软雅黑"
        }

        body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,select,td {
            margin: 0;
            padding: 0;
        }

        body,html {
            margin: 0;
            color: #000;
            background: #f6f6f6;
            background-size: 100%;
            -webkit-tap-highlight-color: transparent
        }

        .head img {
            width: 100%
        }

        .main {
            position: relative;
            display: block;
            top: 0px;
            left: 0px;
            padding: 15px;
            text-align: center;
            border-radius: 40px;
            background-color: #fff;
            margin: 10px;
        }

        .t-t {
            font-size: 22px;
            line-height: 2em;
            text-align: center;
            margin-top: 10px;
        }

        .t-s {
            padding: 12px;
            background-color: #ffdc2b;
            border-radius: 18px;
            max-width: 100%;
            margin: 16px auto;
            text-align: center;
            position: relative;
            -webkit-transition: background-color .3s ease
        }

        .t-si {
            padding: 18px;
            background-color: #ffdc2b;
            border-radius: 18px;
            max-width: 100%;
            margin: 10px auto;
            text-align: center;
            position: relative;
            -webkit-transition: background-color .3s ease
        }

        .t-si span {
            font-size: 1.1em;
            line-height: 1.5em;
            font-weight: 700;
            color: #773a35;
            padding: 5px 20px
        }

        img {
            max-width: 100%
        }

        .t-s span {
            font-size: 1.1em;
            line-height: 1.5em;
            font-weight: 700;
            color: #773a35;
            padding: 5px 20px
        }

        .t-s.active span {
            color: #fff
        }

        .t-s.active {
            background-color: #9d75bd
        }

        .t-si span {
            font-size: 1.1em;
            line-height: 1.5em;
            font-weight: 700;
            color: #773a35;
            padding: 5px 20px
        }

        .t-s:after {
            background-color: #f00;
            position: absolute;
            right: 12px;
            top: 7px;
            padding: 5px;
            background: rgba(255,255,255,1);
            content: "√";
            display: none;
            opacity: 0.8;
            -webkit-transition: opacity 3s ease;
            font-size: 1.1em
        }

        .t-s.error:after {
            background: rgba(255,0,0,1);
            content: "×";
            color: #fff
        }

        .t-s.active:after {
            display: block;
            opacity: 1
        }

        .t-c {
            line-height: 1.5em;
            padding: 10px;
            margin-bottom: 10px;
            font-size: 0.95rem;
            text-align: left;
            color: #332625;
            overflow: hidden
        }

        .t-s.h {
            max-width: 60%;
            display: inline-block;
            margin-left: 5px;
            margin-right: 5px
        }

        .t-si.h {
            max-width: 60%;
            display: inline-block;
            margin-left: 5px;
            margin-right: 5px
        }

        .t-r {
            font-weight: 700;
            overflow: hidden
        }

        .t-r span {
            display: inline-block;
            vertical-align: middle;
            font-size: 50px;
            color: #27AE60;
            text-shadow: 3px 0 4px #16A085
        }

        .t-img {
            margin-top: 10px;
            margin-bottom: 10px
        }

        .t-img img {
            width: 240px;
            height: 180px;
            max-width: 90%
        }

        .t-btn,.t-btn:link,.t-btn:visited {
            color: #fff;
            background-color: #9d75bd;
            padding-top: 12px;
            padding-bottom: 13px;
            padding-left: 15px;
            padding-right: 15px;
            display: inline-block;
            line-height: 1em;
            min-width: 60%;
            margin: 10px auto;
            border-radius: 7px;
            text-decoration: none
        }

        .t-btn {
            font-size: 1.1em
        }

        .share {
            position: fixed;
            top: 0;
            right: 0;
            left: 0;
            bottom: 0;
            background: rgba(0,0,0,.6);
            display: none;
            z-index: 1000
        }

        .share img {
            position: absolute;
            top: 0;
            right: 0;
            width: 70%;
            max-width: 320px
        }

        .livetip {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: rgba(0,0,0,.7);
            z-index: 200
        }

        .lt-w {
            position: fixed;
            top: 100px;
            left: 10px;
            right: 10px;
            z-index: 300
        }

        .lt-w .lt-c {
            background-color: #fff;
            padding-top: 10px;
            padding-bottom: 20px
        }

        a,a:link,a:visited {
            color: #fff;
            text-decoration: none;
        }

        .mane {
            width: 85%;
            margin-bottom: 10px;
            text-align: center;
            background: url(/mane.png) no-repeat;
            height: 56px;
            color: #773a35;
            font-weight: 600;
            font-size: 16px;
            line-height: 36px;
            background-size: 100%;
            text-overflow: ellipsis;
            white-space: nowrap;
            word-break: keep-all;
            padding: 0 25px;
            overflow: hidden
        }

        .scrollable {
            position: relative;
            width: 100%;
            height: 60px;
            overflow: hidden;
            text-align: center
        }

        .scrollable .items {
            height: 2000em;
            width: 100%;
            position: absolute;
            overflow: hidden
        }

        .scrollable .items img {
            height: 60px;
            width: 100%
        }

        .divmenu {
            width: 100%;
            color: #fff;
            margin-top: 45px;
            line-height: 40px;
            overflow: hidden
        }

        .divmenu a {
            color: #EFEFEF
        }

        .button {
            display: inline-block;
            zoom:1;height: 40px;
            vertical-align: baseline;
            margin: 0 2px;
            outline: 0;
            cursor: pointer;
            text-align: center;
            text-decoration: none;
            font: 16px/100% Arial,Helvetica,sans-serif;
            padding: .5em 2em .55em;
            text-shadow: 0 1px 1px rgba(0,0,0,.3);
            -webkit-border-radius: .5em;
            -moz-border-radius: .5em;
            border-radius: .5em;
            -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.2);
            -moz-box-shadow: 0 1px 2px rgba(0,0,0,.2);
            box-shadow: 0 1px 2px rgba(0,0,0,.2)
        }

        .button:hover {
            text-decoration: none
        }

        .button:active {
            position: relative;
            top: 1px
        }

        .t-img ul li {
            list-style: none;
            max-width: 100%;
            font-size: 18px;
        }

        select {
            width: 25%;
            height: 34px;
            line-height: 34px;
            border: 1px solid #9bc0dd;
            border-radius: 24px;
            padding-left: 20px;
            -webkit-appearance: none;
            text-align: center;
            font-size: 20px;
        }

        article {
            margin-top: 20px;
            background-color: #f6f6f6;
        }

        .list .box {
            background-color: #fff;
        }

        .list .box .title {
            width: 100%;
            text-align: center;
            height: 40px;
            line-height: 40px;
            background-color: #fff;
            flex-direction: row;
            justify-content: space-between;
        }

        .list .box .title h3 {
            margin-left: 8px;
            font-weight: bold;
        }

        .list .box ul {
            display: flex;
            padding-bottom: 40px;
            flex-direction: column;
            list-style: none;
            margin-left: 2.5%;
            width: 95%;
        }

        .list .box ul li {
            display: flex;
            flex-direction: row;
            position: relative;
            border-bottom: .05rem solid #f6f6f6;
            padding: .625rem 0;
        }

        .list .box .pic {
            width: 4.2rem;
            height: 4.2rem;
            border-radius: .25rem;
            background-size: cover;
            background-position: 50%;
            margin-top: .625rem;
        }

        .list .box .cen {
            width: 58%;
            padding: .5rem;
        }

        .list .box .cen h3 {
            color: #333;
            display: -webkit-box;
            font-size: 14px;
            font-weight: 500;
            line-height: 20px;
            text-overflow: ellipsis;
            padding-top: .2rem;
        }

        .list .box .cen .description {
            color: #8a8a8a;
            padding-top: .25rem;
            line-height: 1.2rem;
            height: 2.4rem;
            overflow: hidden;
            font-size: .75rem;
            text-overflow: ellipsis;
            display: -webkit-box;
        }

        .list .box .lat {
            display: flex;
            width: 18%;
            flex-direction: column;
            justify-content: center;
            align-items: center;
        }

        .list .box .lat .go {
            color: #000;
            background-color: #ffdd2b;
            border-radius: .2rem;
            line-height: 40px;
            width: 50px;
            height: 40px;
            text-align: center;
            font-weight: 600;
        }

        .list .box .lat .donum {
            text-align: center;
            font-size: 12px;
            color: #8a8a8a;
        }
    </style>
</head>
<body class="loading">


<script>
    console.log('this common detail');
    // 记录多少人来到了答案页面
    // $.get("/visit", {sign: "piancaiyun", visit_type: 2});
</script>



<link rel="stylesheet" href="/exam/source/exam/default/css/modal.css">

<div class="modal">
    <div class="modal-inner">
        <p id="guideText">关注我</p>
        <img src="" alt="" class="qrcode">
        <div style="font-size: 12px; color: #ccc;">长按二维码识别</div>
        <div class="close-btn"></div>
    </div>
</div>
<script>
    // 查看更多显示二维码
    // $('#guideText').html('关注我<br>会有更多好玩测试');
    // $('.qrcode').attr('src', '/getwxcode?v=' + getrd());
    //画二维码
    function drawQr() {
        // 制作本题的二维码
        let qrcode= $('#code').qrcode('http://ox0qvt.chfaqy.cn/form/piancaiyun').hide();
        let canvas=qrcode.find('canvas').get(0);

        qr = new Image();
        //   qr.crossOrigin = "Anonymous";
        qr.onload = function () {
            let obj = imgPara("xy(350,850)","120","120","0");
            ctx.rotate(obj.rot * Math.PI / 180);//旋转角度
            ctx.drawImage(qr, obj.x, obj.y, obj.w, obj.h);
            ctx.rotate(-obj.rot * Math.PI / 180);//调整旋转起点
            datasToPng();
        }
        qr.src = canvas.toDataURL('image/jpg');
    }
    // 执行画二维码的操作
    // drawQr();
</script>




<style>
    .return-con {
        -webkit-text-size-adjust: none;
        display: flex;
        line-height: 45px;
        position: fixed;
        top: 0px;
        left: 0px;
        width: 100%;
        border-bottom: .01333rem solid #d0d0d0;
        background: #f6f6fb;
        z-index: 1200;
    }

    .return-btn {
        line-height: 45px;
        padding-left: 1.2rem;
        color: #000;
        display: flex;
        font-size: 16px;
        padding-right: 13px;
        -webkit-box-align: center;
        -webkit-align-items: center;
        align-items: center;
        -webkit-box-pack: center;
        -webkit-justify-content: center;
        justify-content: center;
        position: relative;
    }

    .return-btn::before {
        content: "";
        position: absolute;
        top: 0;
        left: .2rem;
        bottom: 0;
        margin: auto;
        width: 9px;
        height: 16px;
        background: url('') 50% no-repeat;
        background-size: .48rem auto;
    }
    .ts-btn {
        line-height: 45px;
        display: flex;
        position: fixed;
        right: 25px;
    }

    .ts-btn a {
        color: #000;
        text-decoration: none;
        font-size: 16px;
    }
</style>
<div class="return-con">
    <div  class="return-btn">返回</div>
    <div class="ts-btn">
        <a href="/complaint">投诉</a>
    </div>
</div>
<div class="divmenu"></div>
<div style="width:100%; height:5px;"></div>
<script>
    $('.return-btn').click(function() {
        history.back(-1);
    })
</script>


<div class="main" id="main" ms-controller="test">
    <div>
        <div class="mane">测测您的偏财运如何？</div>
        <div class="t-c">
            偏财运预测分析结果
        </div>
        <div class="t-s">
            <span>
                <span id="star">★★★★☆</span><br>
偏财运<text id="text_desc">一般</text>，手气时好时坏，打牌时很容易让你自乱方寸，所以保持良好的心态极为重要。感觉来势不对时不要太心烦意乱，尽量以技术为主，减少因财运不足而造成的损失。等到运气好转时，就可以大杀三方，你将会连本带利的赚回来。
            </span>
        </div>
    </div>
</div>
<script>
    var fen = "<?php echo $_GET['id']?>";
    $(function(){
        // 星星的展示
        var star = '';
        for (var i=0; i<5; i++){
            if(i < fen){
                star += '★';
            }else{
                star += '☆';
            }
        }
        $('#star').text(star);
        // 文字说明
        var textList = {'1':'差', '2':'一般', '3':'良好', '4':'旺', '5':'很旺'}
        $('#text_desc').text(textList[fen]);
    })
</script>

<?php include_once '../../common/article.php'?>

<script type="text/javascript" >
    function request(strParame) {
        var args = new Object();
        var query = location.search.substring(1);

        var pairs = query.split("&"); // Break at ampersand
        for (var i = 0; i < pairs.length; i++) {
            var pos = pairs[i].indexOf('=');
            if (pos == -1) continue;
            var argname = pairs[i].substring(0, pos);
            var value = pairs[i].substring(pos + 1);
            value = decodeURIComponent(value);
            args[argname] = value;
        }
        return args[strParame];
    }


    function showQ() {
        $("#zhao").hide();
    }
</script>




<script>
    var _hmt = _hmt || [];
    (function() {
        var hm = document.createElement("script");
        hm.src = "https://hm.baidu.com/hm.js?<?php echo $data['baidu_id']?>";
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(hm, s);
    })();
</script>
<script>
    $.ajax({
        'url' : 'http://<?php echo $data['d6'];?>/count_views.php',
        'type' : 'POST',
        'data': {res: 'friend'},
        'success' : function(){}
    });
    console.log('this common footer');
</script>


<script type="text/javascript">
    function onBridgeReady() {
        WeixinJSBridge.call('hideOptionMenu');
    }
    if (typeof WeixinJSBridge == "undefined") {
        if (document.addEventListener) {
            document.addEventListener('WeixinJSBridgeReady', onBridgeReady, false);
        } else if (document.attachEvent) {
            document.attachEvent('WeixinJSBridgeReady', onBridgeReady);
            document.attachEvent('onWeixinJSBridgeReady', onBridgeReady);
        }
    } else {
        onBridgeReady();
    }
</script>
</body>
</html>
